package cn.iocoder.yudao.module.bpm.controller.admin.definition;


import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.magic.api.MagicApiList;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import java.util.ArrayList;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "管理后台 - 动态表单")
@RestController
@RequestMapping("/bpm/magicApi")
@Validated
public class BpmMagicApiController {
    @Resource
    private MagicApiList magicApiList;

    @GetMapping("/getApiList")
    @Operation(summary = "获取maigic-api接口（api）")
    public CommonResult<ArrayList> getApiList() {
        return success(magicApiList.getApiList().getCheckedData());
    }

}
